load("@rules_python//python:defs.bzl", "py_library")
load("@pip_deps//:requirements.bzl", "requirement")

package(
    default_testonly = 1,
    default_visibility = ["//visibility:public"],
)

py_library(
    name = "tink_config",
    srcs = ["__init__.py"],
    deps = [
        "_helpers",
        ":_key_types",
    ],
)

py_library(
    name = "_key_types",
    srcs = ["_key_types.py"],
    deps = [
        "@tink_py//tink/aead",
        "@tink_py//tink/daead",
        "@tink_py//tink/hybrid",
        "@tink_py//tink/jwt",
        "@tink_py//tink/mac",
        "@tink_py//tink/prf",
        "@tink_py//tink/signature",
        "@tink_py//tink/streaming_aead",
    ],
)

py_test(
    name = "_key_types_test",
    srcs = ["_key_types_test.py"],
    deps = [
        ":_helpers",
        ":_key_types",
        requirement("absl-py"),
    ],
)

py_library(
    name = "_helpers",
    srcs = ["_helpers.py"],
    deps = [
        ":_key_types",
        "@tink_py//tink/proto:tink_py_pb2",
    ],
)

py_test(
    name = "_helpers_test",
    srcs = ["_helpers_test.py"],
    deps = [
        ":_helpers",
        requirement("absl-py"),
        "//util/test_keys",
        "@tink_py//tink/aead",
        "@tink_py//tink/hybrid",
        "@tink_py//tink/mac",
        "@tink_py//tink/proto:tink_py_pb2",
    ],
)
